Skip to content

Adjustments of loader-v4#2630

Merged
Lichtso merged 1 commit into
anza-xyz:masterfrom
Lichtso:refactor/loader-v4
Aug 20, 2024
Merged

Adjustments of loader-v4#2630
Lichtso merged 1 commit into
anza-xyz:masterfrom
Lichtso:refactor/loader-v4

Conversation

@Lichtso
Copy link
Copy Markdown

@Lichtso Lichtso commented Aug 16, 2024

Problem

While writing the SIMD for loader-v4 I noticed some minor issues with our implementation.

Summary of Changes

  • Removes the empty program account check (InvalidAccountData), which is redundant because of the subsequent minimum size check.
  • Adjusts checks of program.state.status to conform to error messages.
  • Adds check to prevent authority transfer to itself.
  • Adjusts most execution errors to UnsupportedProgramId.
  • Removes the redundant owner check in execution (InvalidAccountOwner).
  • Adds a tombstone in the program cache upon retraction.

@mergify
Copy link
Copy Markdown

mergify Bot commented Aug 16, 2024

The Firedancer team maintains a line-for-line reimplementation of the
native programs, and until native programs are moved to BPF, those
implementations must exactly match their Agave counterparts.
If this PR represents a change to a native program implementation (not
tests), please include a reviewer from the Firedancer team. And please
keep refactors to a minimum.

- Adjusts checks of program.state.status to conform to error messages.
- Adds check to prevent authority transfer to itself.
- Adjusts most execution errors to UnsupportedProgramId.
- Removes the redundant owner check in execution.
- Adds a tombstone in the program cache upon retraction.
@Lichtso Lichtso force-pushed the refactor/loader-v4 branch from 624da53 to b72ff86 Compare August 19, 2024 08:48
@Lichtso Lichtso requested a review from pgarg66 August 19, 2024 14:27
Comment thread programs/loader-v4/src/lib.rs
Comment thread programs/loader-v4/src/lib.rs
@Lichtso Lichtso merged commit acaf5b7 into anza-xyz:master Aug 20, 2024
@Lichtso Lichtso deleted the refactor/loader-v4 branch August 20, 2024 18:26
ray-kast pushed a commit to abklabs/agave that referenced this pull request Nov 27, 2024
- Removes the empty program account check (InvalidAccountData).
- Adjusts checks of program.state.status to conform to error messages.
- Adds check to prevent authority transfer to itself.
- Adjusts most execution errors to UnsupportedProgramId.
- Removes the redundant owner check in execution.
- Adds a tombstone in the program cache upon retraction.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants